<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="MvcContrib.FluentHtml.ModelViewPage<Universum.Views.MyClasses.MyClassesIndexViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>
<asp:Content ID="BreadcrumbsContent" ContentPlaceHolderID="Breadcrumbs" runat="server">
	<%= Html.Breadcrumb().Home().AppendText("Your classes").End() %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<fieldset>
		<legend><em>
			<h3>
				Classes you've signed up for</h3>
		</em></legend>
		<% 
			foreach (var item in Model.SignedClasses)
			{
		%>
		<div class="span-11" >
			<%Html.BeginUserLink<MyClassesController>(c => c.Class(item.Slug)); %>
		<span style="font-size:large;text-decoration:underline;">
				<%=item.Name %></span>	
				<%Html.EndLink(); %>
			<em>created by </em><strong>
				<%=item.Owner %></strong>
			
			<div class="span-22 class-description">
			<h3 >
			<a href="#">
				Click to show description for this class
				</a>
				</h3>
			<div >
				<%=item.Description %>
			</div>
		</div>
		</div>
		<%
			}
		%>
	</fieldset>
	<fieldset>
		<legend><em>
			<h3>
				Classes that you can sign up for</h3>
		</em></legend>
		<% 
			foreach (var item in Model.UnSignedClasses)
			{
		%>
		<div class="span-22 last" >
			<%--<%Html.BeginUserLink<MyClassesController>(c => c.Class(item.Slug)); %>--%>
			<span style="font-size:large;">
				<%=item.Name %>
				</span>
			<%--<%Html.EndLink(); %>--%>
			<em>created by </em><strong>
				<%=item.Owner %></strong>
			<%
				using (Html.BeginForm<MyClassesController>(c => c.SignUp(item.ID)))
				{
					Writer.Write(this.SubmitButton("Sign up"));
				}
			%>
		</div>
		<div class="span-22 class-description">
			<h3 >
			<a href="#">
				Click to show description for this class
				</a>
				</h3>
			<div >
				<%=item.Description %>
			</div>
		</div>
		<%
			}
		%>
	</fieldset>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
<% Html.RenderPartial("EditorAndDateUserControl"); %>
<script type="text/javascript">
	$(function() {
	$(".class-description").accordion(

		{ active: false, autoHeight: false,
			collapsible: true
		}
	
		);
});
</script>
</asp:Content>
